#ifndef MainService_h
#define MainService_h

#include <Winsock2.h>

#pragma comment(lib, "Ws2_32.lib")

#include "thread.h"
#include "data_stream.h"
#include "ssl.h"
#include "config.h"
#include "user.h"

class CService : public CThread{
public:
	CService();
	~CService();
	bool initialize(CDataStream * n_DataStream);
	void run();

protected:
	void execute();

protected:
	bool get_resource();
private:
	char * m_Addr;
	int m_Port;
	CSSL * m_ssl;
	CDataStream * m_DataStream;

	WSADATA WSAData;

	char * m_Request;
	char * m_TempBuf;
	int m_Length;
};

#endif
